package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/7/4.
 */
@Entity
@Table(name = "gc_gc_hsty", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class GcGcHstyEntity  extends IAcross {
    public GcGcHstyEntity()
    {
        super();
    }

    public GcGcHstyEntity(IAcross ia)
    {
        super(ia);
    }

    private int gghstyId;
    private int gcId;
    private int prevId;
    private String type;
    private Timestamp startDate;
    private Timestamp endDate;
    private Timestamp lastUpdate;
    private Integer updateId;


    @Id
    @Column(name = "gghsty_id")
    @GeneratedValue
    public int getGghstyId() {
        return gghstyId;
    }

    public void setGghstyId(int gghstyId) {
        this.gghstyId = gghstyId;
    }

    @Basic
    @Column(name = "gc_id")
    public int getGcId() {
        return gcId;
    }

    public void setGcId(int gcId) {
        this.gcId = gcId;
    }

    @Basic
    @Column(name = "prev_id")
    public int getPrevId() {
        return prevId;
    }

    public void setPrevId(int prevId) {
        this.prevId = prevId;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "start_date")
    public Timestamp getStartDate() {
        return startDate;
    }

    public void setStartDate(Timestamp startDate) {
        this.startDate = startDate;
    }

    @Basic
    @Column(name = "end_date")
    public Timestamp getEndDate() {
        return endDate;
    }

    public void setEndDate(Timestamp endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "last_update")
    public Timestamp getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Timestamp lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    @Basic
    @Column(name = "update_id")
    public Integer getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Integer updateId) {
        this.updateId = updateId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GcGcHstyEntity that = (GcGcHstyEntity) o;

        if (gcId != that.gcId) return false;
        if (gghstyId != that.gghstyId) return false;
        if (prevId != that.prevId) return false;
        if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false;
        if (lastUpdate != null ? !lastUpdate.equals(that.lastUpdate) : that.lastUpdate != null) return false;
        if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (updateId != null ? !updateId.equals(that.updateId) : that.updateId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = gghstyId;
        result = 31 * result + gcId;
        result = 31 * result + prevId;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (startDate != null ? startDate.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        result = 31 * result + (lastUpdate != null ? lastUpdate.hashCode() : 0);
        result = 31 * result + (updateId != null ? updateId.hashCode() : 0);
        return result;
    }
}
